package hh.util;

import java.util.function.Function;

/**
 * Funcational Interface
 * Fmn : m表示入参个数，n表示出参个数
 */
public interface Fun {

    interface F00 {void apply();}
    interface F01<T> {T apply();}
    interface F10<T> {void apply(T t);}
    interface F11<I,O> extends Function<I,O>{}
    interface F20<I1,I2> {void apply(I1 i1,I2 i2);}
    interface F21<I1,I2,O> {O apply(I1 i1,I2 i2);}
    interface F30<I1,I2,I3> {void apply(I1 i1,I2 i2,I3 i3);}
    interface F31<I1,I2,I3,O> {O apply(I1 i1,I2 i2,I3 i3);}

    interface F00Throw {void apply()throws Exception;}
    interface F01Throw<T> {T apply()throws Exception;}
    interface F10Throw<T> {void apply(T t)throws Exception;}
    interface F11Throw<I,O> {O apply(I t)throws Exception;}
    interface F20Throw<I1,I2> {void apply(I1 i1,I2 i2)throws Exception;}
    interface F21Throw<I1,I2,O> {O apply(I1 i1,I2 i2)throws Exception;}
    interface F30Throw<I1,I2,I3> {void apply(I1 i1,I2 i2,I3 i3)throws Exception;}
    interface F31Throw<I1,I2,I3,O> {O apply(I1 i1,I2 i2,I3 i3)throws Exception;}
}
